/**
 * \class Enviroment Generator/context/Enviroment.h
 *
 *  Created on: 13 apr 2011
 *      Author: ytc0039
 *
 * \brief This class is the interface to the context.
 *
 * This class responsibility is to create new context and provide an
 * interface to the context layers.
 */

#ifndef ENVIROMENT_H_
#define ENVIROMENT_H_

#include "IContext.h"

class Enviroment {
public:
	Enviroment();
	virtual ~Enviroment();

	/**
	 * \brief Get the current context instance.
	 *
	 * The current context instance is the current layer which is used.
	 *
	 * @return Current context
	 */
	IContext* getContextInstance();

	/**
	 * \brief Add a compound context
	 *
	 * Add a new layer to the context, this layer will be of type compound context.
	 *
	 *
	 * @return the new context
	 */
	IContext* addCompoundContext();
	/**
	 * \brief Add a expression context.
	 *
	 * \todo More info here
	 *
	 * @return new context.
	 */
	IContext* addExpressionContext();

	/**
	 * \brief Removes the top layer of the context.
	 *
	 * Since the contexts are produced in layers, the top layer will be stripped of.
	 * All the identification which are inserted into the top most layer will be deleted.
	 *
	 *
	 * @return parent context(current)
	 */
	IContext* removeContext();






private:
	IContext* m_Context;
};

#endif /* ENVIROMENT_H_ */
